package com.info3k.client.components.validators;

import com.google.gwt.user.client.ui.PasswordTextBox;

public class PasswordTextBoxValidator extends PasswordTextBox {
	
	public PasswordTextBoxValidator(){
		setValid(false);
	}
	
	private boolean valid;

	public boolean isValid() {
		return valid;
	}

	public void setValid(boolean valid) {
		if(!valid){
			getElement().getStyle().setProperty("border", "thin solid #FF0000");
		} else {
			getElement().getStyle().setProperty("border", "thin solid #00FF00");
		}
		this.valid = valid;
	}
}
